package com.share.service.impl;

import com.share.domain.Role;
import com.share.mapper.RoleMapper;
import com.share.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * created by caifan 2018/06/01
 */
@Service
public class RoleService implements IRoleService {
    @Autowired
    RoleMapper roleMapper;
    @Override
    @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
    public void insert(Role role) {
        roleMapper.insertRole(role);
        System.out.println("ddd");
    }
}
